import { h } from "koishi"

export const name = "ignore-messages-with-prefix"

export function apply(ctx) {
  ctx.middleware((s, next) => {
    ctx.logger.debug(s.stripped.content)
    if (s.stripped?.content && h.unescape(s.stripped.content).match(/^>>\s?\/\/|^<\s?\/\/|^> </)) return
    return next()
  }, true)
}
